Operating Systems
Back to se350
Goals
- Abstract away hardware knowledge so that programs don't need to worry about them
- can evolve by replacing interals while conforming to the interface
- manage resources available on the computer
Pieces
Kernel
- runs in main memory
- contains most frequently used functions
Monitor
- Runs in Kernel mode, allows access to protected memory and can run privileged functions
- Controls sequence of events
- Batch programs together
- program returns control when finished
Hardware features
- Memory protection (disallowing an area to be altered)
- Timer (prevents a job from taking up all the time)
- privileged instructions (certain intructions can only be run by the monitor)
Time sharing systems
- Multiple users on terminals, users should see feedback immediately
Processes
- Program in execution
- instance of program running
- entity that can be assigned to and executed on a processor
- A single unit of activity characterized by
- a single sequential thread of execution
- a current state
- an associated set of system resources
- Contains three components:
- executable program
- associated data needed for program
- execution context of program (everything the OS needs to manage the process)
- Common problems with designing system software:
- has to juggle multiple programs, threads, interrupts, IO, shared resources
- improper sync
- failed mutual exclusion
- nondeterministic operation
- deadlocks
Memory management
- process isolation
- automatic allocation and management
- support swapping program code
- protection and access control
- long term storage
- virtual memory
- allows programmers to address memory logically without worrying about physical memory
- virtual address: page number plus offset in page
- real address: physical address
Info Protection
- Availability: protects against interruption (e.g. RAID, dual power supply)
- Confidentiality: permissions (e.g.
chmod
)
- data integrity: protect data from unauthorized modification
- authenticity: proper verification of identity of users (e.g. phishing, XSS)
Scheduling
- Fairness
- Differential responsiveness
- discriminate among different classes of jobs
- QoS
- Efficiency: maximize throughput, minimize response time
Modern Operating Systems
- Microkernel architecture (e.g. QNX)
- assigns only a few essential functions to the kernel
- address spaces
- interpricess communication (IPC)
- basic scheduling
- everything else in user space
- Multithreading
- Process divided into concurrent threads
- Thread: dispatchable unit of work, can be interrupted
- Process is a collection of threads
- Symmetric multiprocessing
- multiple processors
- share memory and IO
- can all do the same things
- Distributed
- illusion of single main memory
- asymmetric multiprocessing
- moderate success of cell processor
- Big-Little architectures
- Faults
- permanent, temporary, transient/intermittent
- redundancy (spacial, temporal, info)
- process isolation, concurrency control, VMs, checkpoints/rollback
- Multicore
- concurrency: reentrant routines, proper kernel structure management
- scheduling: user-level, kernel level
- sync: IO management from single or multiple cores
- memory management: spacial separation of memory
- reliability and fault tolerance: new types of faults